<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles" %>
	<% 
	String path = request.getContextPath(); 
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path; 
%>
    
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
        <title>Admin Home Page</title>
        <!-- Bootstrap -->
        <link href="<%=basePath%>/bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
        <link href="<%=basePath%>/bootstrap/css/bootstrap-responsive.min.css" rel="stylesheet" media="screen">
        <link href="<%=basePath%>/vendors/easypiechart/jquery.easy-pie-chart.css" rel="stylesheet" media="screen">
        <link href="<%=basePath%>/assets/styles.css" rel="stylesheet" media="screen">
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
            <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->
        <script src="<%=basePath%>/vendors/modernizr-2.6.2-respond-1.1.0.min.js"></script>
        <script src="<%=basePath%>/js/cms_js/app.js"></script>
    </head>
    
    <body>
        <div class="navbar navbar-fixed-top">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                     <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="#">51Smart管理面板</a>
                    <div class="nav-collapse collapse">
                        <ul class="nav pull-right">
                            <li class="dropdown">
                                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown"> <i class="icon-user"></i> 小强 <i class="caret"></i>

                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a tabindex="-1" href="#">资料</a>
                                    </li>
                                    <li class="divider"></li>
                                    <li>
                                        <a tabindex="-1" href="login.html">注销</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                        <ul class="nav">
                            <li>
                                <a href="index.html">应用列表</a>
                            </li>
                            <li class="active">
                                <a href="#">添加应用</a>
                            </li>
                            <li class="dropdown">
                                <a href="#" data-toggle="dropdown" class="dropdown-toggle">即将完成 <b class="caret"></b>

                                </a>
                                <ul class="dropdown-menu" id="menu1">
                                    <li>
                                        <a href="#">即将完成 <i class="icon-arrow-right"></i>

                                        </a>
                                        <ul class="dropdown-menu sub-menu">
                                            <li>
                                                <a href="#">即将完成</a>
                                            </li>
                                            <li>
                                                <a href="#">即将完成</a>
                                            </li>
                                            <li>
                                                <a href="#">即将完成</a>
                                            </li>
                                        </ul>
                                    </li>
                                    <li>
                                        <a href="#">即将完成</a>
                                    </li>
                                    <li>
                                        <a href="#">即将完成</a>
                                    </li>
                                    <li class="divider"></li>
                                    <li>
                                        <a href="#">即将完成</a>
                                    </li>
                                    <li>
                                        <a href="#">即将完成</a>
                                    </li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">即将完成 <i class="caret"></i>

                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a tabindex="-1" href="#">即将完成</a>
                                    </li>
                                    <li>
                                        <a tabindex="-1" href="#">即将完成</a>
                                    </li>
                                    <li>
                                        <a tabindex="-1" href="#">即将完成</a>
                                    </li>
                                    <li>
                                        <a tabindex="-1" href="#">即将完成</a>
                                    </li>
                                    <li class="divider"></li>
                                    <li>
                                        <a tabindex="-1" href="#">在线问答</a>
                                    </li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">用户 <i class="caret"></i>

                                </a>
                                <ul class="dropdown-menu">
                                    <li>
                                        <a tabindex="-1" href="#">用户列表</a>
                                    </li>
                                    <li>
                                        <a tabindex="-1" href="#">搜索用户</a>
                                    </li>
                                    <li>
                                        <a tabindex="-1" href="#">权限管理</a>
                                    </li>
                                </ul>
                            </li>
                        </ul>
                    </div>
                    <!--/.nav-collapse -->
                </div>
            </div>
        </div>
        <div class="container-fluid">
            <div class="row-fluid">
                <div class="span3" id="sidebar">
                    <ul class="nav nav-list bs-docs-sidenav nav-collapse collapse">
                        <li>
                            <a href="index.html"><i class="icon-chevron-right"></i><span class="badge badge-info pull-right">2,221</span> 应用列表</a>
                        </li>
                        <li class="active">
                            <a href="#"><i class="icon-chevron-right"></i> 添加应用</a>
                        </li>
                        <li>
                            <a href="#"><span class="badge badge-info pull-right">731</span> 管理登录次数</a>
                        </li>
                        <li>
                            <a href="#"><span class="badge badge-important pull-right">12</span> 错误次数</a>
                        </li>
                        <li>
                            <a href="#"><span class="badge badge-important pull-right">12</span> 错误修复次数</a>
                        </li>
                        <li>
                            <a href="#"><span class="badge badge-info pull-right">1,234</span> 用户反馈次数</a>
                        </li>
                        <li>
                            <a href="#"><span class="badge badge-info pull-right">2,221</span> 用户反馈处理次数</a>
                        </li>
                        <li>
                            <a href="#"><span class="badge badge-important pull-right">0</span> 宕机次数</a>
                        </li>
                    </ul>
                </div>
                
                <!--/span-->
                <div class="span9" id="content">
                    <div class="row-fluid">
                        <div class="alert alert-success">
              <button type="button" class="close" data-dismiss="alert">&times;</button>
                            <h4>Success</h4>
                          The operation completed successfully
                        </div>
                        <!-- //面包屑导航 -->
                      <div class="navbar">
                          <div class="navbar-inner">
                                <ul class="breadcrumb">
                                    <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                                    <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar" rel='tooltip'>&nbsp;</a></i>
                                    <li>
                                        <a href="#">管理中心</a> <span class="divider">/</span>  
                                    </li>
                                    <li>
                                        <a href="#">添加应用</a> 
                                    </li>
                                </ul>
                          </div>
                      </div>
                    </div>

                    <div class="row-fluid">
                        <div class="span12">
                            <!-- block -->
                            <div class="block">
                                <div class="navbar navbar-inner block-header">
                                    <div class="muted pull-left">添加应用</div>
                                    <div class="pull-right"><span class="badge badge-info">ok</span>

                                    </div>
                                </div>
                                <div class="block-content collapse in">
                               

                                <form action="saveApp" method="post" id="cms-app" enctype="multipart/form-data" class="formBord" style="width:100%;top:0px;">

                                  <!-- msg level [error warning info success] -->

                                  <div class="control-group">
                                    <label class="control-label" for="inputName">应用名</label>
                                    <div class="controls">
                                      <s:textfield name="app.name" id="name" cssClass="text" />
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                   
                                  <div class="control-group">
                                    <label class="control-label" for="inputavatar">头像</label>
                                    <div class="controls">
                                     <s:file name="avatar" label="File" id="avatar" cssClass="text"/>
                                      <span class="help-inline"> </span>
                                    </div>
                                  </div>
                                   
                                  <div class="control-group">
                                    <label class="control-label" for="inputAuthor">作者</label>
                                    <div class="controls">
                                      <s:textfield name="app.author" id="author" />
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                   
                                  <div class="control-group">
                                    <label class="control-label" for="categoryId">分类</label>
                                    <div class="controls">
                                      <s:select name="app.category" id="categoryId"
					                    list="categoryList" listKey="id" listValue="name" headerKey=""
					                    headerValue="--choose please--"/>
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>

                                  <div class="control-group">
                                    <label class="control-label" for="Rating">评分</label>
                                    <div class="controls">
                                     	<s:textfield name="app.rating" id="rating"/>
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                  <div class="control-group">
                                    <label class="control-label" for="apk">Apk</label>
                                    <div class="controls">
                                       <s:file name="apk" label="File" size="30%" id="apk"/>
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                  <div class="control-group">
                                    <label class="control-label" for="description">描述</label>
                                    <div class="controls">
                                      <s:textarea name="app.description" rows="10" cols="50"
                    						id="description"/>
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                  <div class="control-group">
                                    <label class="control-label" for="visitNum">浏览数</label>
                                    <div class="controls">
                                      <s:textfield name="app.visitNum" />
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                   <div class="control-group">
                                    <label class="control-label" for="preview">预览图片</label>
                                    <div class="controls">
                                      <s:file name="preview" label="File" size="30%" id="preview"/>
						                <input type="button" value="addMore" onclick="addMore();" /> 
						                <input type="button" value="delete" onclick="deleteFileInput();"/>
						                <div id="board"></div>
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>
                                   <!--  <div class="control-group">
                                  <label class="control-label" for="inputInfo">Rayhov Recommend</label> 
                                    <div class="controls">
                                      <label class="checkbox">
                                        <input name="rayhovRecommend" type="checkbox">Rayhov Recommend
                                      </label>
                                      <span class="help-inline"></span>
                                    </div>
                                  </div>-->
                                  <div>
                                    <button type="button"  onclick="addApp();" class="btn btn-primary">保存</button>
                                    <button type="button" class="btn">取消</button>
                                  </div>

                                </form>
                                
                                </div>
                            </div>
                            <!-- /block -->
                        </div>
                    </div>

                </div>
            </div>
            <hr>
            <footer>
                <p>&copy; 西安联通 2013</p>
            </footer>
        </div>
        <!--/.fluid-container-->
        <script src="<%=basePath%>/vendors/jquery-1.9.1.min.js"></script>
        <script src="<%=basePath%>/bootstrap/js/bootstrap.min.js"></script>
        <script src="<%=basePath%>/vendors/easypiechart/jquery.easy-pie-chart.js"></script>
        <script src="<%=basePath%>/assets/scripts.js"></script>
        <script>
        $(function() {
            // Easy pie charts
            $('.chart').easyPieChart({animate: 1000});
        });
        </script>
    </body>

</html>